Field of the Invention
The present invention relates to an information processing apparatus, a method of controlling the same, and a non-transitory computer readable medium.
Description of the Related Art
In recent years, in image processing apparatuses, there exist those that cause a comprised program to execute in the background. For example, in Japanese Patent Laid-Open No. 2013-131818, when it is determined that a long time is required for execution of instructed processing, a warning to that effect, and a message querying as to whether or not to execute a logout towards a user who is logged in is displayed on an image forming apparatus. When execution of the logout is selected by the user, the image processing apparatus causes the user to log out, and executes the instructed processing as background processing. With this, even in a case where the instructed processing requires a long time, the image processing apparatus can execute the processing after the user has performed the logout.
Meanwhile, image processing apparatuses generally comprise an application platform that causes various functions such as those of a scanner, a printer, or the like, to operate in units of applications. Applications that operate on an application platform, and background processing that the image processing apparatus executes are multitasked and executed in parallel by the image processing apparatus. For this reason, when the image processing apparatus performs processing using a CPU as background processing, there is a performance degradation such as a degradation in operationally of an application that provides a UI screen displayed on an operation screen on the image processing apparatus, for example.
Accordingly, in Japanese Patent Laid-Open No. 2011-100475, control is performed so that in a case where an application for which background processing cannot be executed is activated, the background processing is suspended, and in a case where applications for which background processing can be executed are activated, background processing is performed.
Japanese Patent Laid-Open No. 2011-100475 defines information as to whether or not background processing can be executed in advance for programs configuring applications, and based on this information, performs control of background processing. Meanwhile, there are cases in which an image processing apparatus falls into a state in which background processing cannot be executed when background processing execution control is performed based merely on information as to whether or not the image processing apparatus can execute it and activation statuses for applications in various execution modes. For example, in an application provided as a Web application, as long as it is being accessed from an information processing apparatus, the image processing apparatus determines the application to be activated. For this reason, when the Web application declares that background processing cannot be executed, the image processing apparatus cannot execute background processing as long as it is being accessed irrespective of whether or not a user is operating. Also, in a case of an application that displays a UI screen on an operation screen on the image processing apparatus, when processing is stopped in an activated state due to an application malfunction, the image processing apparatus continues to suppress the background processing. In such a case, the image processing apparatus becomes unable to execute the background processing as long as the application is not terminated forcibly.